package com.googlecode.xbeandatasource.jasperreport;

import com.googlecode.xbeandatasource.common.EmployeeFactory;

import net.sf.jasperreports.engine.JRDataSource;
import net.sf.jasperreports.engine.JRDataSourceProvider;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JRField;
import net.sf.jasperreports.engine.JasperReport;


/**
 * @author Johny Huang
 *
 */
public class XBeanDataSourceProvider implements JRDataSourceProvider{

	public XBeanDataSourceProvider(){
		
	}
	
	public XBeanDataSourceProvider(Class clazz){
		
	}
	
	public XBeanDataSourceProvider(Object obj){
		
	}
		
	public JRDataSource create(JasperReport report) throws JRException {
		return new XBeanDataSource(EmployeeFactory.getJohny());
	}

	public void dispose(JRDataSource dataSource) throws JRException {
		// TODO Auto-generated method stub
		
	}

	public JRField[] getFields(JasperReport report) throws JRException,
			UnsupportedOperationException {
		// TODO Auto-generated method stub
		return null;
	}

	public boolean supportsGetFieldsOperation() {
		return true;
	}

}
